<template>
  <div class="padTest">
      <button @click="getPDF">获取PDF</button>
    <iframe id="PDF_BOX" width="100%" height="100%"></iframe>

    <!--<embed id="PDF_BOX" type="application/pdf" width="100%" height="100px">-->
  </div>
</template>

<script>
  import dd from 'dd'
  import { mapState, mapMutations, mapActions } from 'vuex'
  import store from './store/index'
  export default dd.component(
    {
      data () {
        return {

        }
      },
      methods:{
        getPDF(){
          //let pdf = document.getElementById('PDF_BOX')
          //pdf.src = 'static/PDF/实体类字段说明文档.pdf'
          //window.open('static/PDF/web/')
          //let url = 'test.pdf'
          let url = 'demo.pdf'
          window.open(`/static/pdf/web/viewer.html?file=${url}`)
        }
      },
      computed:{

      },
      created(){

      }
    },
    {
      state:{
        'self':[]
      },
      getters:{},
      mutations:{
        'self':[]
      },
      actions:{
        'self':[]
      }
    },
    {
      mName:'pdfTest',
      store
    })
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
